<html>
<meta charset="utf-8">

<head>
    <script src="jquery-3.2.1.min.js"></script>
    <style>
        .dropdown {
            padding: 10px;
            background-color: #3e8e41;
            color: white;
            position: relative;
            display: inline-block;
        }

        .dropdown_content {
            position: absolute;
            display: none;
            min-width: 100px;
            z-index: 1;
            box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            width: 100%
        }

        .dropdown:hover .dropdown_content {
            display: block;
        }

        .dropdown_content a {
            text-decoration: none;
            padding: 5px;
            display: block;
            background-color: lavender;
            color: black;
        }

        .dropdown_content a:hover {
            background-color: lightskyblue;
        }
    </style>
</head>

<body>
    <div class="dropdown" style="float:left">
        <span>请选择[左边]</span>
        <div class="dropdown_content" style="left:0;margin-top:10px;">
            <a href="#">选项1</a>
            <a href="#">选项1</a>
            <a href="#">选项1</a>
        </div>
    </div>

    <div class="dropdown" style="float:right">
            <span>请选择[右边]</span>
            <div class="dropdown_content" style="right:0;margin-top:10px;">
                <a href="#">选项1</a>
                <a href="#">选项1</a>
                <a href="#">选项1</a>
            </div>
        </div>
</body>

</html>